package cn.xorange.commons.data.entity;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

/**
 * @author : yangjian
 * @date : 2021/8/8
 */
public class Order implements Serializable {

    public Order(){
        this.orders = new HashMap<>();
    }

    private Map<String[],String> orders;

    public void asc(String...colName){
        this.orders.put(colName,"asc");
    }

    public void desc(String...colName){
        this.orders.put(colName,"desc");
    }

    public Map<String[],String> getOrders(){
        if (Objects.isNull(this.orders)){
            this.orders = new HashMap<>();
        }
        return this.orders;
    }
}
